package com.example.spinning.mapper;

import com.example.spinning.bean.MaterialOutStock;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MaterialOutStockMapper {

    //得到入库单
    List<MaterialOutStock> getMaterialOutStock(@Param("start") Integer start, @Param("count") Integer count);

    //查找表的行数
    int getCountMaterialOutStock();

    //根据条件查找表的行数
    int getCountMaterialOutStockByCondition(
            @Param("unit") String unit,
            @Param("date") String date,
            @Param("name") String name,
            @Param("purpose") String purpose);

    //根据id查找入库单
    MaterialOutStock getMaterialOutStockById(Long id);

    //根据条件查询入库单
    List<MaterialOutStock> getMaterialOutStockByCondition(
            @Param("start") Integer start,
            @Param("count") Integer count,
            @Param("unit") String unit,
            @Param("date") String date,
            @Param("name") String name,
            @Param("purpose") String purpose);

    //增加
    int addMaterialOutStock(MaterialOutStock materialOutStock);

    //修改
    int updateMaterialOutStockById(MaterialOutStock materialOutStock);

    //删除
    int delMaterialOutStockById(@Param("ids") String[] ids);


}
